import SurveyRecordRoute from './field/surveyRecord'
import SynthesizeDataRoute from './field/synthesizeData'
import PictureViewRoute from './field/pictureView'
import surveyTrack from './field/surveyTrack'

export default [
  {
    path: '/',
    name: 'layout',
    redirect: '/login',
    component: ()=>import('@/layout/layout.vue'),
    children: [
      // 首页
      {
        path: '/home',
        name: 'home',
        label: '首页',
        component: () => import('@/views/home/index.vue')
      },

      // 田间管理
      {
        path: '/fieldManage',
        name: 'fieldManage',
        label: '田间管理',
        component: () => import('@/views/fieldManage/index.vue'),
        children: [
          ...SurveyRecordRoute,
          ...SynthesizeDataRoute,
          ...PictureViewRoute,
          ...surveyTrack
        ]
      },

      // 设备管理
      {
        path: '/equipmentManage',
        name: 'equipmentManage',
        label: '设备管理',
        component: () => import('@/views/equipmentManage/index.vue'),
      },

      // 用户管理
      {
        path: '/userManage',
        name: 'userManage',
        label: '用户管理',
        component: () => import('@/views/userManage/index.vue')
      },
    ]
  }
]